package 第三方工具类.hutool.加解密;

import cn.hutool.crypto.asymmetric.RSA;
import org.junit.Test;

import java.security.PrivateKey;
import java.security.PublicKey;

/**
 * Description
 *
 * @Author: SunAo
 * @Date: 2022/2/18 11:16
 */
public class RSA简单使用 {

    @Test
    public void 生成密钥(){
        RSA rsa = new RSA();
        PrivateKey privateKey = rsa.getPrivateKey();
        PublicKey publicKey = rsa.getPublicKey();
        System.out.println(privateKey.toString());
        System.out.println(publicKey.toString());
    }
}
